package com.cx.config;


import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //文件磁盘图片url 映射body
        registry.addResourceHandler("/img/**").addResourceLocations("file:C:\\Users\\fhy\\IdeaProjects\\gamemall2\\gamemall-web\\src\\main\\webapp\\gamepicture\\");
        registry.addResourceHandler("/body/**").addResourceLocations("file:C:\\Users\\fhy\\IdeaProjects\\gamemall2\\gamemall-web\\src\\main\\webapp\\gamebody\\");
    }
}

